<template>
  <div class="warp-continer">
    <div class="layer">
      <div class="close" @click="Close">
        <i class="iconfont icon-guanbi"></i>
      </div>
      <div class="main">
        <h4 class="title">确认要离开收银台？</h4>
        <p class="text">请尽快完成支付，否则将被取消</p>
        <p class="btn">
          <a class="cancel" @click="Cancel">取消订单</a>
          <a class="ok" @click="OK">确认支付</a>
        </p>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  methods: {
    //关闭
    Close() {
      this.$emit("Close");

      // console.log("Cancel11");
    },
    //取消
    Cancel(e) {
      this.$emit("cancel");

      // console.log("Cancel11");
    },
    //完成
    OK() {
      this.$emit("pay");
    },
  },
};
</script>
<style lang="scss" scoped>
.warp-continer {
  position: absolute;
  z-index: 9999;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  .layer {
    width: 276px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    margin: 0px 37px;
    background-color: white;
    padding: 24px 0;
    text-align: center;
    .close {
      position: absolute;
      right: 10px;
      top: 5px;
      color: #666666;
      font-size: 25px;
    }
    .main {
      margin-top: 10px;
      .title {
        font-family: PingFangSC-Medium;
        font-size: 18px;
        color: #333333;
        font-weight: bold;
      }
      .text {
        margin-top: 8px;
        font-family: PingFangSC-Regular;
        font-size: 14px;
        color: #666666;
      }
      .btn {
        margin-top: 24px;
        a {
          padding: 6px;
          text-align: center;
          width: 80px;
          height: 32px;
          line-height: 32px;
          border: 1px solid #4fb0f9;
          border-radius: 16px;
          margin-right: 24px;
        }
        .cancel {
          font-family: PingFangSC-Regular;

          font-size: 14px;
          color: #0091ff;
        }
        .ok {
          font-family: PingFangSC-Regular;
          background: #4fb0f9;
          font-size: 14px;
          color: #ffffff;
        }
      }
    }
  }
}
</style>